<?php
// Copyright 2012 @Wondershare
// $Id: Cache.php 437020 2012-07-11 08:46:41Z xuwh $

class Cache {
    public static $cache = null;
    public static function begin(){
        
        if(!Cache::$cache){
            Cache::$cache = Yii::app()->cache;
        }
        return Cache::$cache;
    }
    
    public static function setvalue(){
        Yii::app()->cache->set('id1','val1');
    }
    
    public static function getvalue(){
        return Cache::$cache->get('id1');
    }
    
}
